#{extends 'main.html' /}

#{set 'moreStyles'}
<link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/Users/common.scss'}" />
<link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/Users/edit.scss'}" />
#{/set}
#{set 'moreScripts'}
<script src="@{'/public/javascripts/transferPrice.js'}" type="text/javascript" charset="utf-8"></script>
#{/set}
<script language="javascript">
$(function(){
	//把用户中心设置为选中状态
	$(".categorynav ul li").removeClass("active");
	$("#user_item").addClass("active");
	var tpId = #{if order.transferPrice}'${order.transferPrice.id}'#{/if}#{else}""#{/else};
	initialPriceToolsWithValues('provice', 'city', 'company', tpId);
});
function postData() {
	$('form').submit();
}
</script>
<div id="edit-comment">
	<center><h1>修改订单</h1></center>
	<table>
		#{form @orders.confirmOrderInfo(), name:'form1', id:'form1'}
		<tr class="tr_title">
			<td colspan="2">
				您选购的商品总价为：<font class="price">${order.commodityPrice}</font> 元&nbsp;&nbsp;
				本单总重量： <font class="price">${order.totalWeight}</font> 千克
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<div id="errMsg" class="error"></div>
			</td>
		</tr>
		<tr>
			<td class="left">订单编号：</td>
			<td class="right">
				<input type="hidden" name="order.id" value="${order.id}">
				<font class="important">${order.id}</font>
			</td>
		</tr>
		<tr>
			<td class="left">配送及运费：</td>
			<td class="right">
				从 <font class="red">北京市</font> 到 
				<select id="provice"></select>
				<select id="city"></select>
				<select id="company" name="order.transferPrice.id"></select>
				<font class="red">*</font>&nbsp;
				<span class="error">#{error 'order.transferPrice' /}</span>
			</td>
		</tr>
		<tr>
			<td class="left">收货人姓名：</td>
			<td class="right">
				<input type="text" name="order.receiver" value="${order.receiver}" />
				<font class="red">*</font>&nbsp;
				<span class="error">#{error 'order.receiver' /}</span>
			</td>
		</tr>
		<tr>
			<td class="left">联系电话/手机：</td>
			<td class="right">
				<input type="text" name="order.phoneNo" value="${order.phoneNo}" />
				<font class="red">*</font>&nbsp;
				<span class="error">#{error 'order.phoneNo' /}</span>
			</td>
		</tr>
		<tr>
			<td class="left">E-mail：</td>
			<td class="right">
				<input type="text" name="order.email" value="${order.email}" />
				<span class="error">#{error 'order.email' /}</span>
			</td>
		</tr>
		<tr>
			<td class="left">邮编：</td>
			<td class="right">
				<input type="text" name="order.zipCode" value="${order.zipCode}" />
			</td>
		</tr>
		<td class="left">收货地址：</td>
		<td class="right">
			<input type="text" name="order.deliveryAddress" value="${order.deliveryAddress}" />
			<font class="red">*</font>&nbsp;
			<span class="error">#{error 'order.deliveryAddress' /}</span>
		</td>
		<tr>
			<td class="left">指定送达时间：</td>
			<td class="right">
				<input type="text" name="order.arrivalTime" value="${order.arrivalTime}" />
			</td>
		</tr>
		<tr>
			<td class="left">指定物流：</td>
			<td class="right">
				<input type="text" name="order.orderTransportCompany" value="${order.orderTransportCompany}" />
			</td>
		</tr>
		<tr>
			<td class="left">订货方式：</td>
			<td class="right">
				<label><input type="radio" name="order.orderingType" value="SELF" #{if order.orderingType=="SELF"}checked#{/if}/>自己订货</label>
				<label><input type="radio" name="order.orderingType" value="AGENT" #{if order.orderingType=="AGENT"}checked#{/if}/>代发货</label>
			</td>
		</tr>
		<tr>
			<td class="left">我的其他要求：</td>
			<td class="right">
				<textarea name="order.remark" cols="30" rows="5" value="${order.remark}"></textarea>
			</td>
		</tr>
		#{/form}
		<tr>
			<td class="left">
				
			</td>
			<td class="right">
				<input class="button1" type="button" value="确认提交" onclick="postData()">
				<a href="@{orders.editOrderDetail(order.id)}"><input class="button1" type="button" value="重置数据"></a>
				<a href="@{users.order()}"><input class="button1" type="button" value="返回列表"></a>
			</td>
		</tr>
	</table>
</div>